<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
    	<script type="text/javascript" src="{{ static_url }}/js/sidebar-common.js"></script>
        <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.2.5.min.js"></script>
        <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui-1.5.min.js"></script>
        <!--link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.4.1/build/tabview/assets/skins/sam/tabview.css" /-->
        <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}uithemes/jquery-ui-themeroller.css" />
         
		<link rel="stylesheet" type="text/css" href="{{ static_url }}/main.css" />
        <script type="text/javascript">
            function showNewComment() {
                $("div.comment-new").show("slow");
            }
            
            function reloadComments() {
                $("#tabContainer > ul").tabs("load", 2);
            }
        </script>
	</head>
	<body style="padding: 8px; border:none;" class="yui-skin-sam">
		<a href="#" onclick="showNewComment(); return false;">&lt; Back</a>
		<table style="width: 100%;">
		    <tr>
		        <td>
		            <h2>{{ location.source }}</h2>
		        </td>
		    </tr>
		</table>
		<hr />
		<table style="width: 100%;">
		    <tr>
		        <td style="vetical-align: top;">
		            <p style="font-size: 1.1em; font-weight: bold; vertical-align: top;">
		                {{ location.type }} Name: {{ location.name }}<br />
		            </p>
		            <p style="font-size: .8em;">
		                Commodity: {{ location.commodity }}
		            </p>
		            {% if location.company %}
		            <p style="font-size: .8em;">
		                Company: {{ location.company }}
		            </p>
					{% endif %}
		        </td>
		        <td style="vertical-align: top;"><img src="{{ static_url }}/images/{{ location.type.internal_code }}.png" /></td>
		    </tr>
		</table>
        <div id="tabContainer">
             <ul>
                 <li class="ui-tabs-nav-item"><a href="/map/sidebar/location/info/{{ location.pk }}/">Info</a></li>
                 <li class="ui-tabs-nav-item"><a href="/map/sidebar/location/photos/{{ location.pk }}/">Photos</a></li>
                 <li class="ui-tabs-nav-item"><a href="/map/sidebar/location/discussion/{{ location.pk }}/">Discussion</a></li>
                 <li class="ui-tabs-nav-item"><a href="/map/sidebar/location/howcanihelp/{{ location.pk }}/">Can I Help?</a></li>
             </ul>
        </div>
        <script type="text/javascript">
            $("#tabContainer > ul").tabs();
        </script>        
<!--		<div id="tabContainer"></div> 
        <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/yahoo-dom-event/yahoo-dom-event.js"></script> 
        <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/element/element-beta-min.js"></script> 
        <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/connection/connection-min.js"></script> 
        <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/tabview/tabview-min.js"></script> 
		<script type="text/javascript">
			var infoTab = new YAHOO.widget.Tab({ 
				label: 'Info', 
                {% if location.description %}
				    dataSrc: 'info/{{ location.pk }}', 
                {% else %}
                    dataSrc: 'info/none/',
                {% endif %}
				cacheData: true, 
				active: true 
			})
			var photosTab = new YAHOO.widget.Tab({ 
				label: 'Photos', 
                {% if location.photos_count %}
				    dataSrc: 'photos/{{ location.pk }}',
                {% else %}
                    dataSrc: 'photos/none/',
                {% endif %}                 
				cacheData: true 
			})
			var discussionTab = new YAHOO.widget.Tab({ 
				label: 'Discussion', 
				dataSrc: 'discussion/{{ location.pk }}', 
				cacheData: true 
			})
			var helpTab = new YAHOO.widget.Tab({ 
				label: 'How Can I Help?', 
				dataSrc: 'howcanihelp/{{ location.pk }}', 
				cacheData: true 
			})
			var tabView = new YAHOO.widget.TabView(); 
			tabView.addTab(infoTab); 
			tabView.addTab(photosTab); 
			tabView.addTab(discussionTab); 
			tabView.addTab(helpTab); 
			tabView.appendTo('tabContainer'); 
		</script>-->
       	<iframe src="/resources/blank.html" id="sidebar-worker" name="sidebar-worker" style="width: 0px; height: 0px; border: none; display: none;"></iframe>
	</body>
</html>
